<?php

namespace App\Model;


use App\ModelBase\__t_s_accsuper_config;
use App\Redis\expired\access_token;
use App\Redis\SubscribeEvent;
use App\Redis\SubscribeEventKey;
use XWX\Common\H;

class t_s_accsuper_config extends __t_s_accsuper_config
{
    public function access_token()
    {
        $access_token = $this->aconfig_access_token;
        if ($this->aconfig_access_token_date->diffInHours(H::now()) > 1)
        {
            //更新token，统一处理
            $app = new access_token();
            $access_token = $app->funcHandle($this->aconfig_id);
        }


        return $access_token;
    }
}